﻿/**
*	Wall
*	@author 	Liam O'Donnell 2008-04-10
**/

package com.spikything.pants3d.objects {
	
	import com.spikything.pants3d.Pants3D;
	import com.spikything.pants3d.core.Physics;
	import com.spikything.pants3d.core.Point3D;
	import com.spikything.pants3d.events.PhysicsEvent;
	import com.spikything.pants3d.objects.PhysicsSprite3D;
	import com.spikything.pants3d.objects.Rect3D;
	import flash.display.Sprite;
	
	public class Wall extends Rect3D {
		
		public function Wall (x:Number = 0, y:Number = 0, z:Number = 0, child:Sprite = null, width:Number = 750, height:Number = 500, depth:Number = 300, weightless:Boolean = true, frictionless:Boolean = false, ghostMode:Boolean = false) {
			super(x, y, z, child, width, height, depth, weightless, frictionless, ghostMode);
			graphics.clear(); // TODO comment this and uncomment the drawRect below to see walls and blocks
			_id = "Wall";
			isContained = false;
			pz += depth/2;
			internalFriction = 0;
		}
		
		override public function get isCollidable ():Boolean { return false };
		
		public function setDimensions (width:Number, height:Number, depth:Number):void {
			w = width;
			h = height;
			d = depth;
			graphics.clear();
			graphics.beginFill(0xff0000, .25);
			//graphics.drawRect(-w/2, -h/2, w, h); // Uncomment this line to see resized Walls and Blocks
		}
		
	}
	
}